<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<title>论坛列表</title>
		<!-- Set render engine for 360 browser -->
		<meta name="renderer" content="webkit">
		<!-- No Baidu Siteapp-->
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<!-- Add to homescreen for Chrome on Android -->
		<meta name="mobile-web-app-capable" content="yes">
		<!-- Add to homescreen for Safari on iOS -->
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="__PUBLIC__/assets/css/amazeui.css">
		<link rel="stylesheet" href="__PUBLIC__/assets/css/app.css">
		<!--[if lt IE 9]>
		<script src="http://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
		<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
		<script src="__PUBLIC__/assets/js/amazeui.ie8polyfill.min.js"></script>
		<![endif]-->
		<script type="text/javascript" src="__PUBLIC__/assets/js/jquery-1.9.1.min.js"></script>
		<script type="text/javascript" src="__PUBLIC__/assets/js/jquery.validate.js"></script>
		<script type="text/javascript" src="__PUBLIC__/assets/js/validate-ex.js"></script>
		<script src="__PUBLIC__/assets/js/amazeui.js"></script>
		<script type="text/javascript" src="__PUBLIC__/assets/js/app.js"></script>
		<script type="text/javascript" src="__PUBLIC__/assets/js/jump.js"></script>
		<script type="text/javascript" src="__PUBLIC__/assets/js/limit.js"></script>
		<!--鼠标经过导航跳动开始-->
		<!--<script type="text/javascript">
			$(function(){
				 $(".am-topbar-nav li").each(function(k,a){
					new JumpObj(a,5);//晃动幅度
					$(a).hover(function(){this.parentNode.parentNode.addClass("hover")});
				});
		 	}); 
		
		</script>-->
		<!--鼠标经过导航跳动结束-->
		<script type="text/javascript">
			$(document).ready(function(){
			limitTxt("txtByte","showByte",90,true);
			});
			</script>
		<style type="text/css">
			.am-tabs-default .am-tabs-nav>.am-active a {
				background-color: #FFFFFF;
				color: #343740;
			}
			
			.am-tabs-default .am-tabs-nav a {
				color: #6c6e7b;
				line-height: 42px;
				background: #FFFFFF;
				font-weight: bold;
				font-size: 1.3em;
			}
			
			.am-tabs-bd {
				-moz-border-bottom-colors: none;
				-moz-border-left-colors: none;
				-moz-border-right-colors: none;
				-moz-border-top-colors: none;
				border-color: #FFFFFF;
				border-image: none;
				border-style: none;
				border-width: medium 1px 1px;
				overflow: hidden;
				position: relative;
				transition: height 0.3s ease 0s;
				z-index: 100;
			}
			
			.am-tabs-bd .am-tab-panel {
				float: left;
				padding: 10px 0 15px;
				position: absolute;
				top: 0;
				transform: translateX(-100%);
				transition: transform 0.3s ease 0s;
				visibility: hidden;
				width: 100%;
				z-index: 99;
			}
			
			.container {
				padding-top: 4em;
			}
			
			.am_container {
				width: 1180px;
				margin-left: auto;
				margin-right: auto;
			}
			
			@media ( max-width : 640px) {
				.list_ta {
					margin-bottom: 0.5em;
				}
				.list_ta1 {
					margin-left: 0;
					margin-bottom: 0.5em;
				}
			}
		</style>
		<script type="text/javascript">
			//注册信息表单验证开始
			$(function() {
					var validate = $("#myform_phone").validate({
						rules: {
							phoneuser: {
								required: true,
								isMobile: true,
								isPhone: true
							},
							phoneyzm: {
								required: true
							},
							phonepsd: {
								required: true,
								minlength: 6,
								maxlength: 12
							}
						},
						messages: {
							phoneuser: {
								isMobile: "请输入手机号码！",
								isPhone: "请输入手机号码！"
							},
							phoneread: "请选择！"
						},
						errorPlacement: function(error, element) {
							if (element.is(":radio"))
								error.appendTo(element.parent());
							else if (element.is(":checkbox"))
								error.appendTo(element.parent().parent());
							else if (element.is("input[id=phoneyzm]"))
								error.appendTo(element.parent());
							else if (element.is("input[id=emailyzm]"))
								error.appendTo(element.parent());
							else
								error.insertAfter(element);
						},
					})
					var validate2 = $("#myform_email").validate({
						rules: {
							emailuser: {
								required: true,
								email: true
							},
							emailyzm: {
								required: true
							},
							emailpsd: {
								required: true,
								minlength: 6,
								maxlength: 12
							}
						},
						messages: {
							emailuser: {
								email: "请输入正确的邮箱！"
							},
							emailread: "请选择！"
						},
						errorPlacement: function(error, element) {
							if (element.is(":radio"))
								error.appendTo(element.parent());
							else if (element.is(":checkbox"))
								error.appendTo(element.parent().parent());
							else if (element.is("input[id=phoneyzm]"))
								error.appendTo(element.parent());
							else if (element.is("input[id=emailyzm]"))
								error.appendTo(element.parent());
							else
								error.insertAfter(element);
						},
					})
				})
				//注册信息表单验证结束
		</script>
	</head>
<script>
			function checkSubmitsearch() {
				if ($("#sousuo").val() == "") {
					alert("搜索内容不能为空!")
					window.location.reload();
					$("#sousuo").focus();
					return false;
				}
			}
		</script>

	<body>
		<!--头部导航开始-->
		<!--#include file="head.html"-->
		<!--头部导航结束-->
		<!--内容开始-->
		<div class="container">
			<div class="am-u-lg-12 border_bottom">
				<div class="am-container">
					<div class="am-u-lg-10 am-u-sm-12 list_left"><a href="__APP__/forum">论坛首页 </a></div>
					<div class="am-u-lg-2 am-u-sm-12 pad">
						<div class="am-dropdown am-radius1" data-am-dropdown>
							<form action="__APP__/forum/search" method="get">
								<button type="submit" class="am-btn am-dropdown-toggle am-button" data-am-dropdown-toggle>
									贴子<span class="am-icon-caret-down" style="margin-left: 0.5rem;"></span>
								</button>
								<input type="text" class="search_txt" placeholder="请输入搜索内容" name="sousuo" id="sousuo">
								<button type="submit" class="search_button" onclick="checkSubmitsearch()"></button>
							</form>
							<ul class="am-dropdown-content">
								<li class="am-dropdown-header">标题</li>
							<!--foreach:{$xiala $vo}-->
							<li><a href="__APP__/forum/forum_show?id={$vo.id}">{$vo.forum_title}</a></li>
							<!--/foreach-->
							</ul>
						</div>
					</div>
				</div>
			</div>
			<div class="am-container">
				<div class="am-u-lg-12 list_on pad">
					<a href="__APP__/forum?type=<?php echo $_GET['type']; ?>"  <!--if:{empty($_GET['forum_id'])}-->class="on"<!--/if-->>全部</a>
					<!--foreach:{$type_list $vo}-->
					<a href="__APP__/forum?forum_id={$vo.id}&&type=<?php echo $_GET['type'];?>" <!--if:{$_GET['forum_id'] == $vo['id']}-->class="on"<!--/if--> >{$vo.forum_name}</a>
					<!--/foreach-->
				</div>
				<div class="am-u-lg-12 pad list_li">
					<div class="am-u-lg-7 pad">
						<h2>
						<a  href="__APP__/forum?forum_id=<?php echo $_GET['forum_id']; ?>"   <!--if:{empty($_GET['type'])}-->class="on"<!--/if-->>全部主题</a> 
						<a  href="__APP__/forum?type=3&&forum_id=<?php echo $_GET['forum_id']; ?>" <!--if:{$_GET['type'] == '3'}-->class="on"<!--/if-->>最新</a> 
						<a  href="__APP__/forum?type=2&&forum_id=<?php echo $_GET['forum_id']; ?>" <!--if:{$_GET['type'] == '2'}-->class="on"<!--/if-->>热门</a>
						<a  href="__APP__/forum?type=1&&forum_id=<?php echo $_GET['forum_id']; ?>" <!--if:{$_GET['type'] == '1'}-->class="on"<!--/if-->>精华</a>
					</h2>	

					
						<!--foreach:{$forum_list $vo}-->
						<div class="list_box1">
							<img src="__PUBLIC__/assets/images/zi.jpg" style="margin-right: 1em;"/>
							<a href="__APP__/forum/forum_show?id={$vo.id}">［{$vo.cname}］{$vo.forum_title	len="20"}</a>
							<!--if:{$vo['isnew']<=3}--><span><img src="__PUBLIC__/assets/images/new.png"/></span><!--/if-->
							<!--if:{$vo['isjing'] ==1}--><span><img src="__PUBLIC__/assets/images/jing.png"/></span><!--/if-->							
						</div>
						<!--/foreach-->
					</div>
					<div class="am-u-lg-2 pad">
						<h2>发表时间</h2>
						<!--foreach:{$forum_list $vo}-->
						<div class="list_box">
							{$vo.forum_actor}
							<br> {$vo.release_time time="Y-m-d H:i:s"}
						</div>
						<!--/foreach-->
					</div>
					<div class="am-u-lg-1 pad">
						<h2>回复/查看</h2>
						<!--foreach:{$forum_list $vo}-->
						<div class="list_box">
							<b>{$vo.reply_num}</b>{$vo.browse_num}
						</div>
						<!--/foreach-->
					</div>
					<div class="am-u-lg-2 pad">
						<h2>最后发表</h2>
						<!--foreach:{$forum_list $vo}-->
						<div class="list_box">
							<!--if:{!empty($vo['last_reply'])}-->{$vo.last_reply}<!--/if-->
							<br>  <!--if:{!empty($vo['last_time'])}-->{$vo.last_time time="Y-m-d H:i:s"}<!--/if-->
						</div>
						<!--/foreach-->
					</div>
				</div>
				<div class="am-cf"></div>
				<div class="am-u-lg-12 pad pad_margin">
					<div class="am-u-lg-6 pad"></div>
					<div class="am-u-lg-6 pad">
							<div class="sabrosus">{$page}</div>
					</div>
				</div>
				<div id="post" class="am-u-lg-12 lun_box">
					<h2 class="am-u-lg-12">快速发帖</h2>

					<form action="__APP__/forum/add_save" method="post">
						<div class="am-u-lg-12">
							<div class="am-u-lg-2 pad">
								<select class="list_ta" name="mod">
									<option value="">请选择主题类型</option>
									<!--foreach:{$type_list $vo}-->
									<option value="{$vo.id}">{$vo.forum_name}</option>
									<!--/foreach-->
								</select>
							</div>
							<div class="am-u-lg-6 pad">
								<input type="text" class="list_ta1" name="title" id="txtByte" >
							</div>
							<div class="am-u-lg-4 pad">
								<div class="list_ta1">还可以输入<input type="text" id="showByte" value="90" style="width:20px; border:none;background-color: #ececec;" />个字符</div>
							</div>
						</div>
						<div class="am-u-lg-12">
							<link href="__PUBLIC__/css/umeditor.css" type="text/css" rel="stylesheet">
							<!--    <script type="text/javascript" src="__PUBLIC__/third-party/jquery.min.js"></script>-->
							<script type="text/javascript" charset="utf-8" src="__PUBLIC__/assets/js/umeditor.config.js"></script>
							<script type="text/javascript" charset="utf-8" src="__PUBLIC__/assets/js/umeditor.min.js"></script>
							<script type="text/javascript" src="__PUBLIC__/lang/zh-cn/zh-cn.js"></script>
							<script>
								$(document).ready(function() {
									$(".edui-container").css("width", "100%");
									$(".edui-toolbar").css("width", "100%");
									$(".edui-body-container").css("width", "100%");
								});
							</script>
							<script type="text/plain" id="myEditor" name="content" style="width: 100%; height: 240px;">
								<!--if:{empty($_SESSION['uuser'])}-->
								<p style=" text-align:center; margin-top:1em;">您需要登录后才可以发帖 <a href="__APP__/user/login" style=" color:#ffab49;">登录</a> | <a href="__APP__/user/reg" style=" color:#ffab49;">立即注册</a></p>
							<!--/if-->
							</script>
							<div>
								<h3 id="focush2"></h3>
							</div>
							<script type="text/javascript">
								//实例化编辑器
								var um = UM.getEditor('myEditor');
								/* 							    um.addListener('blur',function(){
								 $('#focush2').html('编辑器失去焦点了')
								 }); */
								um.addListener('focus', function() {
									$('#focush2').html('')
								});
								//按钮的操作
								function insertHtml() {
									var value = prompt('插入html代码', '');
									um.execCommand('insertHtml', value)
								}

								function isFocus() {
									alert(um.isFocus())
								}

								function doBlur() {
									um.blur()
								}

								function createEditor() {
									enableBtn();
									um = UM.getEditor('myEditor');
								}

								function getAllHtml() {
									alert(UM.getEditor('myEditor').getAllHtml())
								}

								function getContent() {
									var arr = [];
									arr.push("使用editor.getContent()方法可以获得编辑器的内容");
									arr.push("内容为：");
									arr.push(UM.getEditor('myEditor').getContent());
									alert(arr.join("\n"));
								}

								function getPlainTxt() {
									var arr = [];
									arr
										.push("使用editor.getPlainTxt()方法可以获得编辑器的带格式的纯文本内容");
									arr.push("内容为：");
									arr
										.push(UM.getEditor('myEditor')
											.getPlainTxt());
									alert(arr.join('\n'))
								}

								function setContent(isAppendTo) {
									var arr = [];
									arr
										.push("使用editor.setContent('欢迎使用umeditor')方法可以设置编辑器的内容");
									UM.getEditor('myEditor').setContent(
										'欢迎使用umeditor', isAppendTo);
									alert(arr.join("\n"));
								}

								function setDisabled() {
									UM.getEditor('myEditor').setDisabled(
										'fullscreen');
									disableBtn("enable");
								}

								function setEnabled() {
									UM.getEditor('myEditor').setEnabled();
									enableBtn();
								}

								function getText() {
									//当你点击按钮时编辑区域已经失去了焦点，如果直接用getText将不会得到内容，所以要在选回来，然后取得内容
									var range = UM.getEditor('myEditor').selection
										.getRange();
									range.select();
									var txt = UM.getEditor('myEditor').selection
										.getText();
									alert(txt);
								}

								function getContentTxt() {
									var arr = [];
									arr
										.push("使用editor.getContentTxt()方法可以获得编辑器的纯文本内容");
									arr.push("编辑器的纯文本内容为：");
									arr.push(UM.getEditor('myEditor')
										.getContentTxt());
									alert(arr.join("\n"));
								}

								function hasContent() {
									var arr = [];
									arr.push("使用editor.hasContents()方法判断编辑器里是否有内容");
									arr.push("判断结果为：");
									arr
										.push(UM.getEditor('myEditor')
											.hasContents());
									alert(arr.join("\n"));
								}

								function setFocus() {
									UM.getEditor('myEditor').focus();
								}

								function deleteEditor() {
									disableBtn();
									UM.getEditor('myEditor').destroy();
								}

								function disableBtn(str) {
									var div = document.getElementById('btns');
									var btns = domUtils.getElementsByTagName(div,
										"button");
									for (var i = 0, btn; btn = btns[i++];) {
										if (btn.id == str) {
											domUtils.removeAttributes(btn, ["disabled"]);
										} else {
											btn.setAttribute("disabled", "true");
										}
									}
								}

								function enableBtn() {
									var div = document.getElementById('btns');
									var btns = domUtils.getElementsByTagName(div,
										"button");
									for (var i = 0, btn; btn = btns[i++];) {
										domUtils.removeAttributes(btn, ["disabled"]);
									}
								}
							</script>
						</div>
						<div class="am-u-lg-1 pad">
							<button type="submit" class="am-btn am-cheng">发表帖子</button>
						</div>
						<!-- 					<div class="am-u-lg-11 pad">
						<input type="checkbox"
							style="margin-right: 0.3em; margin-left: 1.5em;">回帖后跳转到最后一页
					</div> -->
					</form>
				</div>
			</div>
		</div>
		<!--内容结束-->
		<!--底部导航开始-->
		<!--#include file="foot.html"-->
		<!--底部导航结束-->
	</body>

</html>